﻿NExt.form.DateField = function(config) {
    if (!config.width) config.width = NExt.defaults.CONTROL_WIDTH;
    if (!config.height) config.height = NExt.defaults.CONTROL_HEIGHT;

    if (Ext.isFunction(config.validator)) {
        this.decoratedValidator = config.validator;
        config.validator = function(value) {
            value = this.parseDate(value);
            if (!value) {
                return true;
            }
            return this.decoratedValidator(value);
        };
    };

    resolvedConfig = NExt.resolvee(config);
    NExt.form.DateField.superclass.constructor.call(this, resolvedConfig);
};
